﻿using System.Web.Mvc;
using VideoSeller.Business.Models;

namespace VideoSeller.Web.Controllers
{
    public class ContentController : BaseController
    {
	    private readonly ContentModel _contentModel;

	    public ContentController(ContentModel contentModel)
	    {
		    _contentModel = contentModel;
	    }

        public ActionResult Index(int id)
        {
	        var model = _contentModel.GetContentLocalization(id);

	        if (model == null)
	        {
		        return RedirectToAction("NoContent", "Content");
	        }

            return View(model);
        }

		public ActionResult NoContent()
		{
			return View();
		}
    }
}